<!DOCTYPE html>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title></title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="__ADMIN__/css/font.css">
<link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
<script type="text/javascript" src="__ADMIN__/js/jquery.min.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="__ADMIN__/js/xadmin.js"></script>
<script type="text/javascript" src="__ADMIN__/js/cookie.js"></script>
<link rel="stylesheet" href="/static/admin/css/font.css">
<link rel="stylesheet" href="/static/admin/css/font-awesome.min.css">
<style>
.layui-form-item .layui-form-label{
    width: 120px;
}
.layui-form-item .layui-textarea{
    width: 190px;
}
#phone-one-div {display: none}
.layui-form-select {z-index: 99999 !important}
</style>
</head>

<body>
<div class="x-body">
<form class="layui-form">

<table class="layui-table" lay-size="sm">
  <colgroup>
    <col>
  </colgroup>
  <tbody>
    <input type="hidden" name="complaint_id" value="{$data.complaint_id}">
    <input type="hidden" name="mch_id" value="{$data.mch_id}">
    <tr>
      <td>
          <textarea placeholder="请输入回复内容" name="response_content" lay-verify="required" required class="layui-textarea"></textarea>
      </td>
    </tr>
    <tr>
      <td align="center">
          <button class="layui-btn" lay-submit="" lay-filter="save">确定</button>
      </td>
    </tr>

  </tbody>
</table>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
  <legend>投诉协商记录</legend>
</fieldset> 
<ul class="layui-timeline">
    {volist name="data.negotiation_historys.data" id="v"}
      <li class="layui-timeline-item">
        <i class="layui-icon layui-timeline-axis"></i>
        <div class="layui-timeline-content layui-text">
          <h3 class="layui-timeline-title">{$v.operator}</h3>
          <p>
            {$v.operate_details}
            <br>
            {:date('Y-m-d H:i:s',strtotime($v.operate_time))}
          </p>
        </div>
      </li>
    {/volist}
</ul>  
</form>
</div>
<script>

    
    
    layui.use(['form','layer','laydate','upload','layarea','rate'], function(){
          $ = layui.jquery;
          var form = layui.form
          ,layer = layui.layer
          ,laydate = layui.laydate
          ,upload = layui.upload
          ,layarea = layui.layarea
          ,rate = layui.rate;
          
        form.on('submit(save)', function(data){
            $.ajax({
                type:'POST',
                dataType:'json',
                data:data.field,
                success:function(obj){
                    if (obj.message)
                    {
                      layer.alert(obj.message, {icon: obj.icon},function(){
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index);
                        x_admin_father_reload();
                      });    
                    }else{
                      layer.alert('回复完成', {icon: 1},function(){
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index);
                        x_admin_father_reload();
                      });    
                    }

                }
            });
            return false;
        });
    });
    </script>
  </body>

</html>